<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>请求报告</title>
    <link rel="shortcut icon" href="http://www.yunjiaowu.cn/images/yunjiaowu.ico" type="image/x-icon">

</head>
<body>
<h2>请求实时报告</h2>
<button type="button" onclick="delReport()">清屏</button>
<a target="_blank" href="/doc">测试</a>
<pre id="report" style="height:100%;width: 100%; overflow: scroll;"></pre>

<script>
    var socket;
    var report = document.getElementById('report');
    if (window.WebSocket) {
        socket = new WebSocket("#(wsUrl)");
        socket.onmessage = function (event) {
            report.innerHTML = report.innerHTML + event.data + "<br />";
        };
    } else {
        alert("请使用谷歌浏览器");
    }

    function delReport() {
        report.innerHTML = "";
    }
</script>
</body>
</html>